package com.example.lottery.enums;

import com.example.lottery.util.StringUtils;

/**
 * @title: ZodiacSignEnum
 * @projectName: lottery
 * @description: 生肖枚举
 * @date: 2024/3/2
 */
public enum ZodiacSignEnum {

    rat_code("鼠", "6,18,30,42,"),
    cattle_code("牛", "5,17,29,41,"),
    tiger_code("虎", "4,16,28,40,"),
    rabbit_code("兔", "3,15,27,39,"),
    dragon_code("龙", "2,14,26,38,"),
    snake_code("蛇", "1,13,25,37,49,"),
    horse_code("马", "12,24,36,48,"),
    sheep_code("羊", "11,23,35,47,"),
    monkey_code("猴", "10,22,34,46,"),
    chicken_code("鸡", "9,21,33,45,"),
    dog_code("狗", "8,20,32,44,"),
    pig_code("猪", "7,18,31,43,"),
    ;


    String code;
    String value;


    public  static String getValues(String code) {
        for (ZodiacSignEnum signEnum : ZodiacSignEnum.values()) {
            if (StringUtils.equals(code, signEnum.getCode())) {
                return signEnum.getValue();
            }

        }
        return null;
    }


    ZodiacSignEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
